package com.sxpi.chapter02;

import java.io.Serializable;

/**
 * @Author: 董伟豪
 * @Date: 2023/2/6 14:01
 */
public class AddressTest extends Object implements Serializable,Cloneable {

    public static void main(String[] args) throws CloneNotSupportedException {
        Address address = new Address();
        // clone复制对象根本就没有进入构造函数，内存空间地址的复制，而不是clone走new反射来申请内存空间，所以性能会更快
        Address address2 = (Address) address.clone();

    }
}
